<template>
  <h1>websocket链接</h1>
  <div class="websocket_box">
    <el-button type="primary" @click="onAddWbsocket">socket链接</el-button>
  </div>
</template>

<script setup lang="ts">
// import websocket from '../../utils/WebSocket.js'
import websocket from '/@/utils/WebSocket.js'
const onAddWbsocket =()=>{
  websocket.Init("user-1")
  setTimeout(()=>{
    websocket.Send('1','86','2')
  },1000)
}
// setInterval(()=>{
//   websocket.Init("lisi","hello")
// },5000)

</script>

<style scoped>
h1 {
  text-align: center;
  width: 100%;
  text-shadow: 1px 1px rgba(197, 223, 248, 0.8), 2px 2px rgba(197, 223, 248, 0.8), 3px 3px rgba(197, 223, 248, 0.8), 4px 4px rgba(197, 223, 248, 0.8), 5px 5px rgba(197, 223, 248, 0.8), 6px 6px rgba(197, 223, 248, 0.8);
  letter-spacing: 9px;
}
.websocket_box{
  text-align: center;
}
</style>
